#include<iostream>
using namespace std;
const int N = 1e3 + 10;
long long f[N][N];
long long m, n,c;
int main()
{
	cin >> n >> m >> c;
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= m; j++)
		{
			int x; cin >> x;
			f[i][j] = f[i - 1][j] + f[i][j - 1] - f[i - 1][j - 1] + x;
		}
	}

	long long ret = -1e18;
	long long x = 0, y = 0;
	for (int x1 = 1;x1 <= n-c+1;x1++)
	{
		for (int y1 = 1;y1 <= m-c+1;y1++)
		{
			long long x2 = x1 + c-1, y2 = y1 + c-1;
			long long t = f[x2][y2] - f[x1 - 1][y2] - f[x2][y1 - 1] + f[x1 - 1][y1 - 1];
			if (t > ret)
			{
				ret = t;
				x = x1 , y = y1;
			}
		}
	}
	cout << x << " " << y;
	return 0;
}